/****************************************************************************
*                                                                           *
* dxTimer.h -- The Frame timer                                              *
*                                                                           *
* Copyright (c) Ionescu Marius. All rights reserved(2009).                  *
*                                                                           *
****************************************************************************/

#pragma once

class dxTimer
{
	public:
		dxTimer(void);
		~dxTimer(void);

		void init(int fps);
		int framesToUpdate();

	private:
		
		// timer variables
		LARGE_INTEGER timeNow;
		LARGE_INTEGER timePrevious;
		LARGE_INTEGER timerFreq;

		float fps;
		float intervals;
		float intervalsSinceLastUpdate;
		float framesInLastSecond;
		float intervalsPerFrame;
		int Requested_FPS;

};